package day02;

public class DounleDemo {
    public static void main(String[] args) {
        //double:双精度浮点型
        double a = 3.14;//3.14为小数直接量，默认为double型
        float b = 3.14F;//3.14为float型直接量


        double c = 3.0, d = 2.9;
        System.out.println(c - d);//0.10000000000000009,舍入误差
        double e = 6.0, f = 4.9;
        System.out.println(e - f);//1.0999999999999996，舍入误差
        double g = 6.0, h = 1.9;
        System.out.println(g - h);//4.1，没有舍入误差
        double i = 5.5, j = 4.8;
        System.out.println(i - j);


    }


}
